<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>hello</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>

<div style="width:500px;margin:20px auto;text-align: center">
    <table align='center' border='1' cellspacing='0'>
        <tr>
            <td>id</td>
            <td>name</td>
            <td>编辑</td>
            <td>删除</td>
        </tr>
        <tr th:each="c:${page.list}">
            <td th:text="${c.id}"></td>
            <td th:text="${c.name}"></td>
            <td><a th:href="@{/editCategory(id=${c.id})}">编辑</a></td>
            <td><a th:href="@{/deleteCategory(id=${c.id})}">删除</a></td>
        </tr>
    </table>
    <br/>
    <div>
        <a th:href="@{/listCategory(start=0)}">[首  页]</a>
        <a th:href="@{/listCategory(start=${page.pageNum-1})}">[上一页]</a>
        <a th:href="@{/listCategory(start=${page.pageNum+1})}">[下一页]</a>
        <a th:href="@{/listCategory(start=${page.pages})}">[末  页]</a>
    </div>
    <br/>
    <form action="addCategory" method="post">

        name: <input name="name"/> <br/>
        <button type="submit">提交</button>

    </form>
</div>

</body>
</html>